package com.example.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;


@Getter
@AllArgsConstructor
public enum ResultCode {

    //响应成功
    SUCCESS(1000,"操作成功"),
    //服务器内部错误，友好提⽰
    ERROR (2000, "服务繁忙请稍后重试"),
    //操作失败，但是服务器不存在异常
    FAILED (3000, "操作失败"),
    FAILED_UNAUTHORIZED (3001, "未授权"),
    FAILED_PARAMS_VALIDATE (3002, "参数校验失败"),
    FAILED_NOT_EXISTS (3003, "资源不存在"),
    FAILED_ALREADY_EXISTS (3004, "资源已存在"),
    AILED_USER_EXISTS (3101, "⽤⼾已存在"),
    FAILED_USER_NOT_EXISTS (3102, "⽤⼾不存在"),
    FAILED_LOGIN (3103, "⽤⼾名或密码错误"),
    FAILED_USER_BANNED (3104, "您已被列⼊⿊名单, 请联系管理员."),


    EXAM_START_TIME_BEFORE_NOW(3201,"开始时间不能早于当前时间"),
    EXAM_START_TIME_AFTER_END_TIME(3202,"开始时间不能晚于结束时间"),
    EXAM_NOT_EXISTS(3203,"竞赛资源不存在"),
    EXAM_QUESTION_NOT_EXISTS(3204,"新增题目不存在"),


    EXAM_STARTED(3205,"竞赛已开始，禁止操作"),
    EXAM_NOT_QUESTION(3206,"竞赛中不存在题目，请添加"),
    EXAM_IS_FINISH(3206,"竞赛已结束，请先修改竞赛时间"),

    FAILED_PHONE(3207,"请输入正确的手机号"),
    FAILED_CODE_OUTTIME(3208,"验证码已失效"),
    FAILED_CODE_ERROR(3209,"验证码错误"),

    USER_EXAM_HAS_ENTER(3210,"已报名成功"),

    FAILED_FIRST_QUESTION(3301,"当前题目已经是第一题"),
    FAILED_LAST_QUESTION(3301,"当前题目已经是最后一题"),

    FAILED_NOT_SUPPORT_PROGRAM(3401,"代码类型不支持");






    //状态码
    private int code;
    //描述信息
    private String msg;

}
